/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package controllers;


import db.ContingentDb;
import models.Contingent;
import models.Person;
import db.ContingentInterface;
/**
 *
 * @author Jimmi
 * 
 * 21-06-2011, Pelle: Added getMissingContingentCount()
 */
public class ContingentController {

    private Contingent contingent = null;
    private ContingentInterface contingentDb = new ContingentDb();


   public Contingent getContingent() {
        return this.contingent;
    }

    public int createContingent() {
        return this.contingentDb.createContingent(this.contingent);
    }

      public void addPerson(Person person) {
        contingent.setPerson(person);
    }

    public Person getPerson() {
        return contingent.getPerson();
    }
    
    public int getMissingContingentCount() {
        return this.contingentDb.getMissingContingentCount();
    }

}



